package thread.basepackage.t0;

/**
 * sleep(long a) 线程接下来要休眠a毫秒 sleep到底是让哪个线程休眠
 *
 * @author cuihao
 * @date 2017/12/8
 */
public class Run {
    public static void main(String[] args) {
        try {
            MyThread thread = new MyThread();
            System.out.println("main begin = " + System.currentTimeMillis());
            thread.start();
            System.out.println(Thread.currentThread().getName() + " 线程接下来休眠18秒，thread先执行");
            Thread.sleep(18000);
            System.out.println("main end = " + System.currentTimeMillis());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
